<?php

//文章控制器
class zhengcetongjiController extends baseController
{

    /**
     * 政策统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 17:26
     */
    public function indexAction()
    {
        $table_id = $this->common->Get('table_id');
        if ($table_id == ""){
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();

        //显示字段
        $filedlistJson = "
	    [
          {'field':'sort_id','width':'10%','title':'分类','sort':'true'},
          {'field':'coun_num','width':'120','title':'数量','sort':'true'},
          {'field':'baifenbi','width':'320','title':'数量所占百分比','sort':'true'},
          {'field':'renqi','width':'220','title':'点击率','sort':'true'}
         ]";

        $filedSearchList = $filedModel->getsearchfiledByTableid($table_id);
        //会显示出来的字段
        $filedShowList = $filedModel->getshowfiledByTableid($table_id);
        //挂载  组件类
        $this->library('Component');
        $component = new Component();

        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_list.html";
    }

    /**
     * 查询政策统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 16:30
     */
    public function getZhengceTongjiAction()
    {
        $tableModel = new tableModel();
        $table_id = 13;
        $tableName = $tableModel->getTablenameByTableid($table_id);

        $_tableModel = new Model($tableName);

        $page = $this->common->Get("page");
        $limit = $this->common->Get("limit");
        $page = ($page - 1) * $limit;
        $table_sql = $tableModel->getSqlWhereStr_new($table_id);
        if ($table_sql == "") {
            $table_sql = " 1=1";
        }
        $_tableList1 = $_tableModel->findBySql("select sort_id,count('id') as coun_num ,count('id') /( SELECT count(id) as zongshu FROM sl_zhengceku   where {$table_sql}  ) as baifenbi,sum(renqi) as renqi from {$tableName} where {$table_sql} group by sort_id");
        //挂载控件类
        $this->library("Component");
        $ComponentClass = new Component();
        $filedModel = new filedModel();
        $filedAraay = $filedModel->getallFiledByTableid($table_id);
        foreach ($filedAraay as $v) {

            //处理不同字段的显示数据
            foreach ($_tableList1 as $k1 => $v1) {
                $v1[$v['u1']] = $ComponentClass->showKj($v['u7'], $v['u2'], $v['u1'], $v1[$v['u1']], $v['u3'], $v['id']);
                $_tableList1[$k1] = $v1;
            }
        }

        foreach ($_tableList1 as &$value) {
            if ($value['sort_id'] == 0){
                $value['sort_id'] = "其它";
            }else{
                $value['sort_id'] = (new sortModel())->value(['id' => $value['sort_id']])['u1'];
            }
        }

        $_tableList["data"] = $_tableList1;
        $_tableList["code"] = "0";
        $_tableList["msg"] = "";
        $_tableList["count"] = 1;

        $this->common->ajaxReturn($_tableList);

    }

    /**
     * 搜索习惯统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 17:26
     */
    public function sousuoxiguantongjiAction()
    {
        $table_id = $this->common->Get('table_id');
        if ($table_id == ""){
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedlistJson = "
	    [
          {'field':'neirong','width':'260','title':'搜索内容',sort:'true'},
          {'field':'cishu','width':'120','title':'词频',sort:'true'},
          {'field':'baifenbi','width':'320','title':'所占百分比',sort:'true'},
          {'field':'leixing','width':'220','title':'类型',sort:'true'}
         ]";

        $filedSearchList = $filedModel->getsearchfiledByTableid($table_id);
        //会显示出来的字段
        $filedShowList = $filedModel->getshowfiledByTableid($table_id);
        //挂载  组件类
        $this->library('Component');
        $component = new Component();

        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_sousuoxiguan_list.html";
    }

    /**
     * 查询搜索习惯统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 16:30
     */
    public function getsousuoxiguanTongjiAction()
    {
        $tableModel = new tableModel();
        $table_id = 42;
        $tableName = $tableModel->getTablenameByTableid($table_id);

        $_tableModel = new Model($tableName);

        $page = $this->common->Get("page");
        $limit = $this->common->Get("limit");
        $page = ($page - 1) * $limit;
        $table_sql = $tableModel->getSqlWhereStr_new($table_id);
        if ($table_sql == "") {
            $table_sql = " 1 = 1";
        }
        $_tableList1 = $_tableModel->findBySql("select dtime,neirong,leixing,count('id') as cishu ,count('id') /( SELECT count(id) as zongshu FROM {$tableName}   where {$table_sql}  ) as baifenbi  from {$tableName} where {$table_sql}   group by neirong");
        //挂载控件类
        $this->library("Component");
        $ComponentClass = new Component();
        $filedModel = new filedModel();
        $filedAraay = $filedModel->getallFiledByTableid($table_id);
        foreach ($filedAraay as $v) {
            //处理不同字段的显示数据
            foreach ($_tableList1 as $k1 => $v1) {
                $v1[$v['u1']] = $ComponentClass->showKj($v['u7'], $v['u2'], $v['u1'], $v1[$v['u1']], $v['u3'], $v['id']);
                $_tableList1[$k1] = $v1;
            }
        }

        $cp_total = 0;
        $bfb_total = 0;
        foreach ($_tableList1 as &$value) {
            $cp_total += $value["cishu"];
            $bfb_total += $value["baifenbi"];
            $value["neirong"] = !empty($value["neirong"]) ? $value["neirong"] : "-";
            $value['sort_id'] = (new sortModel())->value(['id' => $value['sort_id']])['u1'];
        }

        //统计总数
        $total_data = [
            "neirong" => "统计总数",
            "cishu" => $cp_total,
            "baifenbi" => number_format($bfb_total,2),
            "leixing" => "-"
        ];
        array_unshift($_tableList1,$total_data);

        $_tableList["data"] = $_tableList1;
        $_tableList["code"] = "0";
        $_tableList["msg"] = "";
        $_tableList["count"] = 1;

        $this->common->ajaxReturn($_tableList);

    }

    /**
     * 搜索订阅统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 17:26
     */
    public function dingyuexiguantongjiAction()
    {
        $table_id = $this->common->Get('table_id');
        if ($table_id == ""){
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedlistJson = "
	    [
          {'field':'leixing_str','width':'260','title':'栏目类型',sort:'true'},
          {'field':'cishu','width':'120','title':'数量',sort:'true'},
          {'field':'baifenbi','width':'320','title':'所占百分比',sort:'true'},
          {'field':'dtime','width':'220','title':'订阅时间',sort:'true'}
         ]";

        $filedSearchList = $filedModel->getsearchfiledByTableid($table_id);
        //会显示出来的字段
        $filedShowList = $filedModel->getshowfiledByTableid($table_id);
        //挂载  组件类
        $this->library('Component');
        $component = new Component();


        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_dingyuexiguan_list.html";
    }

    /**
     * 查询订阅习惯统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 16:30
     */
    public function getdingyuexiguanTongjiAction()
    {
        //接受参数
        $dingyuejiluM = new model("dingyuejilu");
        $guanjiancitongjiM = new model("guanjiancitongji");
        $lanmuleixing = $this->common->Get("lanmuleixing");
        $dtime = $this->common->Get("dtime");
        $where_str = "";
        if ($lanmuleixing != "") {
            $guanjiancitongji_list = $guanjiancitongjiM->find("id")->where("lanmuleixing='{$lanmuleixing}' ")->all();
        } else {
            $guanjiancitongji_list = $guanjiancitongjiM->find("id")->all();

        }
        $guanjiancitongji_ids = "";
        foreach ($guanjiancitongji_list as $k => $v) {
            if ($guanjiancitongji_ids == "") {
                $guanjiancitongji_ids = $v["id"];
            } else {
                $guanjiancitongji_ids = $guanjiancitongji_ids . "," . $v["id"];
            }
        }
        $where_str = " leixing in ({$guanjiancitongji_ids}) ";

        if ($dtime != "") {
            $where_str = $where_str . "and" . $dingyuejiluM->getDtimeSql("dtime");
        }

        $list = $dingyuejiluM->findBySql("select dtime,(select ci from sl_guanjiancitongji where id=sl_dingyuejilu.leixing) as leixing_str,leixing,count('id') as cishu ,count('id') /( SELECT count(id) as zongshu FROM sl_dingyuejilu   where {$where_str}  ) as baifenbi  from sl_dingyuejilu where {$where_str} group by leixing  ");

        //统计总数
        $cs_total = 0;
        $bfb_total = 0;
        foreach ($list as &$val){
            $cs_total += $val["cishu"];
            $bfb_total += $val["baifenbi"];
            $val["leixing_str"] = !empty($val["leixing_str"]) ? $val["leixing_str"] : "-";
        }

        //统计总数
        $total_data = [
            "leixing_str" => "统计总数",
            "leixing" => "-",
            "cishu" => $cs_total,
            "baifenbi" => number_format($bfb_total,2),
            "dtime" => "-"
        ];
        array_unshift($list,$total_data);

        $_tableList["data"] = $list;
        $_tableList["code"] = "0";
        $_tableList["msg"] = "";
        $_tableList["count"] = 1;

        $this->common->ajaxReturn($_tableList);

    }

    /**
     * 选项匹配统计
     * User: junshi
     * Date: 2020-01-17
     * Time: 17:26
     */
    public function xuanxiangpipeiAction()
    {
        $table_id = 32;
        if ($table_id == ""){
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedlistJson = "
	    [
          {'field':'wenti','width':'40%','title':'问题',sort:'true'},
          {'field':'xuanxiang','width':'30%','title':'选项',sort:'true'},
          {'field':'shuliang','width':'10%','title':'选择数量',sort:'true'},
          {'field':'baifenbi','width':'10%','title':'所占百分比',sort:'true'}
         ]";

        $filedSearchList = $filedModel->getsearchfiledByTableid($table_id);
        //会显示出来的字段
        $filedShowList = $filedModel->getshowfiledByTableid($table_id);
        //挂载  组件类
        $this->library('Component');
        $component = new Component();

        //查询问题
        $wenti = (new timuModule())->all();

        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_xuanxiangpipei_list.html";
    }

    /**
     * 查询选项匹配统计
     * User: gonghuayao
     * Date: 2020-01-17
     * Time: 16:30
     */
    public function xuanxiangpipeiTongjiAction()
    {

        //获取参数参数
        $datijiluModel = new datijiluModule();
        $wenti = $this->common->Get("wenti");
        $dtime = $this->common->Get("dtime");

        //组装查询条件
        $where = "1 = 1";
        $where_problem = "1 = 1";
        if (!empty($wenti)){
            $where_problem = "id = {$wenti}";
        }
        if (!empty($dtime)) {
            $where = $datijiluModel->getDtimeSql("dtime");
        }

        //查询问题及选项
        $timuModel = new timuModule();
        $wenti_info = $timuModel->where($where_problem)->all();
        //查询问题选项
        $info = [];
        $wenti_ids = [];
        $timuxuanxiangModel = new timuxuanxiangModule();
        foreach ($wenti_info as $v){
            //查询选项
            $wenti_ids[] = $v["id"];
            $xuanxiang = $timuxuanxiangModel->where(["laiyuanbianhao"=>$v["xuanxiang"]])->all();
            foreach ($xuanxiang as $val){
                $val["wenti"] = $v["biaoti"];
                $val["timu_id"] = $v["id"];
                $info[] = $val;
            }
        }

        //查询选择的数量和百分比
        if (!empty($wenti_ids)){
            $wenti_ids_str = implode(",",$wenti_ids);
            $where_total = "timu in ($wenti_ids_str)";
        }else{
            $where_total = "1 = 1";
        }
        $datijilu_total = $datijiluModel->where($where_total." and ".$where)->count();
        $baifenbi_total = 0;
        foreach ($info as &$vv){
            $where_now = "timu = {$vv["timu_id"]} and xuanxiang = {$vv["id"]}"." and ".$where;
            $shuliang = $datijiluModel->where($where_now)->count();
            $vv["shuliang"] = $shuliang;
            $vv["baifenbi"] = $datijilu_total != 0 ? number_format(($shuliang / $datijilu_total),4) : 0;
            $baifenbi_total += $vv["baifenbi"];
        }
        //统计总数
        $total_data = [
            "wenti" => "统计总数",
            "xuanxiang" => "-",
            "shuliang" => $datijilu_total,
            "baifenbi" => number_format($baifenbi_total,4),
        ];
        array_unshift($info,$total_data);

        $_tableList["data"] = $info;
        $_tableList["code"] = "0";
        $_tableList["msg"] = "";
        $_tableList["count"] = 1;

        $this->common->ajaxReturn($_tableList);

    }

    /**
     * 企业产业情况
     * User: junshi
     * Date: 2020-01-17
     * Time: 17:26
     */
    public function qiyechanyeAction()
    {
        $table_id = 32;
        if ($table_id == ""){
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedlistJson = "
	    [
          {'field':'chanye','width':'30%','title':'产业',sort:'true'},
          {'field':'shuliang','width':'20%','title':'企业数量',sort:'true'},
          {'field':'baifenbi','width':'20%','title':'所占百分比',sort:'true'}
         ]";

        $filedSearchList = $filedModel->getsearchfiledByTableid($table_id);
        //会显示出来的字段
        $filedShowList = $filedModel->getshowfiledByTableid($table_id);
        //挂载  组件类
        $this->library('Component');
        $component = new Component();

        //查询产业
        $chanye = (new parameterModel())->getparameterArrayByclassid(426);

        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_qiyechanye_list.html";
    }

    /**
     * 企业产业情况统计
     * User: junshi
     * Date: 2020-01-17
     * Time: 16:30
     */
    public function qiyechanyeTongjiAction()
    {

        //获取参数参数
        $qiyeModule = new qiyeModule();
        $chanye = $this->common->Get("chanye");
        $dtime = $this->common->Get("dtime");

        //组装查询条件
        $where = "classid = 426";
        $where_time = "1 = 1";
        if (!empty($chanye)){
            $where .= " and id = {$chanye}";
        }
        if (!empty($dtime)) {
            $where_time = $qiyeModule->getDtimeSql("dtime");
        }

        //查询问题及选项
        $list = (new parameterModel())->where($where)->all();

        //查询选择的数量和百分比
        $shuliang_total = $qiyeModule->where($where_time)->count();
        foreach ($list as &$val){
            $where_now = "chanyeleibie = {$val["id"]}"." and ".$where_time;
            $shuliang = $qiyeModule->where($where_now)->count();
            $val["chanye"] = $val["u1"];
            $val["shuliang"] = $shuliang;
            $val["baifenbi"] = $shuliang_total != 0 ? number_format(($shuliang / $shuliang_total),4) : 0;
        }

        $_tableList["data"] = $list;
        $_tableList["code"] = "0";
        $_tableList["msg"] = "";
        $_tableList["count"] = 1;

        $this->common->ajaxReturn($_tableList);

    }

    //======分割线==========//

    //显示文章列表
    public function addAction()
    {
        $table_id = $this->common->Get('table_id');
        if ($table_id == "") {
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedList = $filedModel->getallFiledByTableid($table_id);
        $filedshowtypeList = $filedModel->getfiledShowTypeBytableid($table_id);

        $tableModel = new tableModel();
        $tableDetail = $tableModel->findOne($table_id);

        //挂载  组件类
        $this->library('Component');
        $component = new Component();
//        $component->getKj();
        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_add.html";
    }

    //显示文章列表
    public function editAction()
    {
        $table_id = $this->common->Get('table_id');
        $id = $this->common->Get('id');
        if ($table_id == "") {
            die("table_id 不能为空");
        }
        $filedModel = new filedModel();
        $filedList = $filedModel->getallFiledByTableid($table_id);
        $filedshowtypeList = $filedModel->getfiledShowTypeBytableid($table_id);

        $tableModel = new tableModel();
        $tableDetail = $tableModel->findOne($table_id);
        $tablename = $tableModel->getTablenameByTableid($table_id);
        $_tableModel = new Model($tablename);
        $_tableDetail = $_tableModel->findOne($id);

        //挂载  组件类
        $this->library('Component');
        $component = new Component();


        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_edit.html";
    }

    // 定义insert方法，完成文章模型的插入
    public function insertAction()
    {
        //获取该用户组信息
        $data_return["status"] = false;
        $data_return["msg"] = "";
        $data_return["code"] = 1;

        $table_id = $this->common->Requert('table_id');
        // 获得当前表名
        $tableModel = new tableModel();
        $tableName = $tableModel->getTablenameByTableid($table_id);
        //先获取文章信息
        $_tableModel = new Model($tableName);

        //1.收集表单数据
        $data = $_tableModel->getFieldArray();

        //2.验证和处理

        $this->helper('input');
        $data = deepspecialchars($data);
        $data = deepslashes($data);


        $filedModel = new filedModel();
        $filedAraay = $filedModel->getallFiledByTableid($table_id);


        //处理表单验证===>正则匹配
        foreach ($filedAraay as $v) {
            //设置了不为空
            if ($v['u4'] == "是") {
                if ($data[$v['u1']] == "" || $data[$v['u1']] == null) {
                    $data_return["msg"] = "操作失败:" . $v['u2'] . "不能为空";
                    $this->common->ajaxReturn($data_return);

                }

            }

            if (isset($v['u14']) && $GLOBALS['config_regular'][$v['u14']] != "无" && $GLOBALS['config_regular'][$v['u14']] != "") {
                $n = preg_match($GLOBALS['config_regular'][$v['u14']], $data[$v['u1']], $array);
                /*接下来的正则表达式("/131,132,133,135,136,139开头随后跟着任意的8为数字 '|'(或者的意思)
                 * 151,152,153,156,158.159开头的跟着任意的8为数字
                 * 或者是188开头的再跟着任意的8为数字,匹配其中的任意一组就通过了
                 * /")*/
                //var_dump($array); //看看是不是找到了,如果找到了,就会输出电话号码的
                if (count($array) == 0) {
                    //改字段不合法
                    $data_return["msg"] = $v['u2'] . "字段不合法";
                    $this->common->ajaxReturn($data_return);

                }
            }
        }


        foreach ($filedAraay as $v) {
            $filedList = $filedModel->findBySql("select * from sl_filed where  u7='时间框' and u8='CURRENT_TIMESTAMP' and model_id='{$table_id}' and u1='{$v['u1']}' ");
            if (count($filedList) > 0) {
                $data[$v['u1']] = date('Y-m-d H:i:s', time());
            }
        }


        //单独处理密码
        foreach ($filedAraay as $v) {
            $filedList = $filedModel->findBySql("select * from sl_filed where  u7='密码' and model_id='{$table_id}' and u1='{$v['u1']}' ");
            if (count($filedList) > 0) {
                $data[$v['u1']] = md5($data[$v['u1']]);
            }
        }
        foreach ($filedAraay as $v) {
            $filedList = $filedModel->findBySql("select * from sl_filed where  u7='文本编辑器' and model_id='{$table_id}' and u1='{$v['u1']}' ");
            if (count($filedList) > 0 && !empty($data[$v['u1']])) {
                $data[$v['u1']] = html_entity_decode($data[$v['u1']]);
            }
        }


        //3调用模型完成入库并给出提示
        if ($_tableModel->insert($data)) {
            $data_return["status"] = true;
            $data_return["msg"] = "添加成功";
            $data_return["code"] = 0;

        } else {
            $data_return["msg"] = "添加失败";

        }
        $this->common->ajaxReturn($data_return);

    }

    // 定义insert方法，完成文章模型的插入
    public function updateAction()
    {
        //获取该用户组信息
        $data_return["status"] = false;
        $data_return["msg"] = "";
        $data_return["code"] = 1;

        $id = $this->common->Requert('id');
        $table_id = $this->common->Requert('table_id');
        if ($id == "") {
            $data_return["msg"] = "id 不能为空";
            $this->common->ajaxReturn($data_return);
        }
        // 获得当前表名
        $tableModel = new tableModel();
        $tableName = $tableModel->getTablenameByTableid($table_id);
        //先获取文章信息
        $_tableModel = new Model($tableName);

        //1.收集表单数据
        $data = $_tableModel->getFieldArray();

        //2.验证和处理

        $this->helper('input');
        $data = deepspecialchars($data);
        $data = deepslashes($data);

        $filedModel = new filedModel();
        $filedAraay = $filedModel->getallFiledByTableid($table_id);


        //处理表单验证===>正则匹配
        foreach ($filedAraay as $v) {
            //设置了不为空
            if ($v['u4'] == "是") {
                if ($data[$v['u1']] == "" || $data[$v['u1']] == null) {
                    $data_return["msg"] = "操作失败:" . $v['u2'] . "不能为空";
                    $this->common->ajaxReturn($data_return);

                }

            }

            if (isset($v['u14']) && $GLOBALS['config_regular'][$v['u14']] != "无" && $GLOBALS['config_regular'][$v['u14']] != "") {
                $n = preg_match($GLOBALS['config_regular'][$v['u14']], $data[$v['u1']], $array);
                /*接下来的正则表达式("/131,132,133,135,136,139开头随后跟着任意的8为数字 '|'(或者的意思)
                 * 151,152,153,156,158.159开头的跟着任意的8为数字
                 * 或者是188开头的再跟着任意的8为数字,匹配其中的任意一组就通过了
                 * /")*/
                //var_dump($array); //看看是不是找到了,如果找到了,就会输出电话号码的
                if (count($array) == 0) {
                    //改字段不合法
                    $data_return["msg"] = $v['u2'] . "字段不合法";
                    $this->common->ajaxReturn($data_return);

                }
            }
        }


        //单独处理密码
        foreach ($filedAraay as $v) {
            $filedList = $filedModel->findBySql("select * from sl_filed where  u7='密码' and model_id='{$table_id}' and u1='{$v['u1']}' ");
            if (count($filedList) > 0 && $data[$v['u1']] != "") {
                $data[$v['u1']] = md5($data[$v['u1']]);
            }
        }

        //var_dump($data);die();

        foreach ($filedAraay as $v) {
            $filedList = $filedModel->findBySql("select * from sl_filed where  u7='文本编辑器' and model_id='{$table_id}' and u1='{$v['u1']}' ");
            if (count($filedList) > 0 && !empty($data[$v['u1']])) {
                $data[$v['u1']] = html_entity_decode($data[$v['u1']]);
            }
        }


        //3调用模型完成入库并给出提示
        if ($_tableModel->update($data)) {
            $data_return["status"] = true;
            $data_return["msg"] = "更新成功";
            $data_return["code"] = 0;

        } else {
            $data_return["msg"] = "更新失败";

        }
        $this->common->ajaxReturn($data_return);

    }

    //定义delete方法，完成文章的删除
    public function deleteAction()
    {
        $data_return["status"] = true;
        $data_return["msg"] = "添加成功";
        $data_return["code"] = 0;

        $ids = $this->common->Requert('id');
        $table_id = $this->common->Requert('table_id');
        if ($ids == "") {
            $data_return["msg"] = "id 不能为空";
            $this->common->ajaxReturn($data_return);
        }
        if ($table_id == "") {
            $data_return["msg"] = "table_id不能为空";
            $this->common->ajaxReturn($data_return);
        }

        $tableModel = new tableModel();
        $tableName = $tableModel->getTablenameByTableid($table_id);

        $array_id = explode(",", $ids);
        $array_id = array_unique($array_id);

        $_tableModel = new Model($tableName);


        if ($_tableModel->delete($array_id) != "false") {
            $data_return["status"] = true;
            $data_return["msg"] = "删除成功";
            $data_return["code"] = 1;

        } else {
            $data_return["msg"] = "删除成功";

        }
        $this->common->ajaxReturn($data_return);

    }

    //显示导入数据
    public function daoruAction()
    {
        $table_id = $this->common->Get('table_id');
        if ($table_id == "")
            die("table_id 不能为空");


        include CUR_VIEW_PATH . "Szhengcetongji" . DS . "zhengcetongji_daoru.html";
    }

}
